package com.mmz.action;

import com.mmz.domain.Product;
import com.mmz.service.ProductService;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class ProductAction extends ActionSupport implements ModelDriven<Product>{
	private Product product = new Product();
	
	public void setProductService(ProductService productService) {
		this.productService = productService;
	}
	private ProductService productService;
	public String save(){
		System.out.println(product);
		productService.save(product);
		return SUCCESS;
	}
	@Override
	public Product getModel() {
		return product;
	}
}
